package com.my.study.designPatterns.compoundPattern;


public class RedHeadDuck implements Quackable{

    private Observerable observerable;


    @Override
    public void quack() {

        System.out.println("ReadHeadDuck quack");
        notifyObservers();
    }


    @Override
    public void registerObserver(DuckObserver observer) {

        observerable.registerObserver(observer);

    }

    @Override
    public void notifyObservers() {

        observerable.notifyObservers();
    }
}
